package top.yaofengqiao.springcloudsimple.auth.biz.domain.auth.model.valobj;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import top.yaofengqiao.springcloudsimple.common.constant.CommonConstant;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author yfq
 * @date 2024/6/7 10:00
 * @description
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class AuthToken {
    // 用户id
    private Long userId;
    // 用户类型
    private Integer userType;
    // 用户名
    private String username;
    // 头像
    private String icon;
    // 手机
    private String mobile;
    // 角色列表
    private List<String> roles;
    // 访问token
    private String accessToken;
    // 刷新token
    private String refreshToken;
    // 客户端id
    private String clientId;
    // 授权范围
    private String scopes;
    // 过期时间
    @JsonFormat(pattern = CommonConstant.TIME_PATTERN)
    private LocalDateTime expiresTime;
}
